<?php
namespace Teemo\Core;

/**
 * Created by PhpStorm.
 * User: lkk
 * Date: 2019/1/16
 * Time: 1:38 PM
 */
trait Singleton
{
    private static $instance;

    public static function getInstance(...$args)
    {
        if (!isset(self::$instance)) {
            self::$instance = new static(...$args);
        }
        return self::$instance;
    }
}